#!/usr/bin/env python3

class Car():
	def __init__(self,in_name,in_type):
		self.name=in_name
		self.type=in_type
		self.comment='this is a car '	

	def description(self):
		print(self.comment)
	

class EleCar(Car):
	def __init__(self,in_name,in_type,batNum):
		super().__init__(in_name,in_type)
		self.batNum=batNum

	def get_bat(self):
		return self.batNum

	def upgrade_battery(self,numupdate):
		if numupdate>100:
			 self.batNum =numupdate

if __name__=='__main__':
	
	elecar= EleCar("eleaaa","batteray",100)
	print("ele bat num:", str(elecar.get_bat()))
	print("to update battery")
	elecar.upgrade_battery(300)
	print("ele bat num:", str(elecar.get_bat()))
